package com.dlinhorst.android_mcom;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class DisarmedActivity extends Activity implements OnClickListener
{
	private TextView txtGameTime;
	private Button btnArm;
	private GameCountDownTimer gameTimer;
	private Boolean bTimerStarted;
	
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_disarmed);
        
        txtGameTime = (TextView)this.findViewById(R.id.textView1);
        btnArm = (Button)this.findViewById(R.id.button1);
        btnArm.setOnClickListener(this);
        gameTimer = new GameCountDownTimer(txtGameTime, 30000, 1);
        bTimerStarted = false;
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu)
    {
        return true;
    }
    
	@Override
	public void onClick(View v)
	{
		if(!bTimerStarted)
		{
			bTimerStarted = true;
			gameTimer.start();
		}
	}
}
